package cn.lblbc.downloadlib.database;

import androidx.room.ColumnInfo;
import androidx.room.Entity;
import androidx.room.PrimaryKey;

/**
 * 下载分片实体（对应 download_chunks 表）
 */
@Entity(tableName = "download_chunks")
public class DownloadChunkEntity {
    @PrimaryKey
    @ColumnInfo(name = "chunk_id")
    private long chunkId;

    @ColumnInfo(name = "file_id")
    private long fileId;

    @ColumnInfo(name = "start_pos")
    private long startPos;

    @ColumnInfo(name = "end_pos")
    private long endPos;

    @ColumnInfo(name = "downloaded_size")
    private Long downloadedSize;

    @ColumnInfo(name = "create_time")
    private long createTime;

    @ColumnInfo(name = "update_time")
    private long updateTime;

    public long getChunkId() {
        return chunkId;
    }

    public void setChunkId(long chunkId) {
        this.chunkId = chunkId;
    }

    public long getFileId() {
        return fileId;
    }

    public void setFileId(long fileId) {
        this.fileId = fileId;
    }

    public long getStartPos() {
        return startPos;
    }

    public void setStartPos(long startPos) {
        this.startPos = startPos;
    }

    public long getEndPos() {
        return endPos;
    }

    public void setEndPos(long endPos) {
        this.endPos = endPos;
    }

    public Long getDownloadedSize() {
        return downloadedSize;
    }

    public void setDownloadedSize(Long downloadedSize) {
        this.downloadedSize = downloadedSize;
    }

    public long getCreateTime() {
        return createTime;
    }

    public void setCreateTime(long createTime) {
        this.createTime = createTime;
    }

    public long getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(long updateTime) {
        this.updateTime = updateTime;
    }
}